hit or miss method